let myHandler = async function (event, context, callback, logger) {
  logger.info(event);

  // do something here
  let userName: string = ''
  let passWord: string = ''

  let code: number = 0
  let statue: string = 'success'
  let res: number = 1


  if (event.body) {
    let _body = JSON.parse(event.body)
    userName = _body.userName
    passWord = _body.passWord
  } else {
    userName = event.userName
    passWord = event.passWord
  }

  if (userName === 'admin' && passWord === '123456') {
    code = 0
    statue = 'success'
    res = 1
  }else {
    code = -1
    statue = 'failed'
    res = 0
  }

  callback({
    code: code,
    statue: statue,
    body: {
      result: res
    }
  });
};

export { myHandler };